import React from 'react';
import EditJson from '../../component/EditJson';
import {Modal} from 'antd';
const Com = () =>{
  const [state,setState] = React.useState({
    show:false,
  })

  const onClick = () => {
    setState((state) =>({
      ...state,
      show:!state.show
    }))
  }

  const handleOk = () => {
    setState((state) =>({
      ...state,
      show:!state.show
    }))
  }
  return(
    <div>
      <button 
      onClick={onClick}
      
      >toggle</button>
      <Modal onOk={handleOk} visible={state.show}>
        <EditJson show={state.show}/>
      </Modal>
    </div>
  )
}
export default Com;